package com.yinhai.asynctask;

import java.util.Map;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.yinhai.constant.Contact;

import android.content.Context;

/**
 * 发送个人消息
 * @author Administrator
 *
 */
public class SendSingleContentsTask  extends AsyncTaskForHttp{
	String retStr = null;
	public SendSingleContentsTask(Context context) {
		super(context);
	}
	
	public SendSingleContentsTask(Context context, boolean autoForword) {
		super(context, autoForword);
	}

	public SendSingleContentsTask(Context context, int timeoutRequestCount,
			boolean autoForword) {
		super(context, timeoutRequestCount, autoForword);
	}
	@Override
	protected void parse(Map<String, Object> result) {
		this.retStr = (String)result.get(AsyncTaskContext.RESPONSE_CONTENT);
		JSONObject jsonObject;
//		try {
//			jsonObject = new JSONObject(retStr);
//			JSONArray ja = (JSONArray)((JSONObject)jsonObject.get("obj")).get("data");
//			if(ja != null && ja.length() > 0) {
//				Contact.USER_ID=((JSONObject)ja.get(0)).get("recid")==null?"":((JSONObject)ja.get(0)).get("recid").toString();
//			}
//		} catch (JSONException e) {
//			// TODO Auto-generated catch block
//			e.printStackTrace();
//		}
		
	}
}
